import Pagination from '@/components/Pagination'
const mixin = {
    components: {
        Pagination
    },
    data () {
        return {
            params: {
                total: null,
                size: 10,
                current: 1
            }
        }
    },
    computed: {},
    methods: {
        setPagination (data) {
            this.params.current = data.current // 当前页
            this.params.total = data.total // 总条数
            this.params.size = data.size // 显示的条数
        },
        handleCurrentChange (currentPage) {
            this.params.current = currentPage
            this.getTableData()
        },
        handleSizeChange (currentSize) {
            this.params.size = currentSize
            this.getTableData()
        }
    }
}
export default mixin
